﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<NewsTitleList>" %>
<% 
    int i = 0;
    foreach (var news in Model.Items)
    {
        i++;
%>
<% if (Model.ShowDate)
   { %>
<span class="postTime">
    <%=news.CreatedOn.ToString("MM-dd")%></span>
<% } %>
<a href="<%=Url.Action("Details","News",new{id=news.Id}) %>" <%=i<=Model.RedCount ? "class=\"red\"" :string.Empty %>>
    <%=news.Title %></a>
<% if (i <= Model.LastestCount)
   { %>
<img src="../../content/images/home/new.gif" width="24" height="11" />
<% } %>
<br />
<% } %>
